<?php
// no direct access
defined('_JEXEC') or die('Restricted access');
//Params
$button			 = $params->get('button', '');
$imagebutton	 = $params->get('imagebutton', '');
$button_pos		 = $params->get('button_pos', 'left');
$button_text	 = $params->get('button_text', JText::_('Search'));
$button_text	 =  JText::_($button_text) ;	 		
$width			 = intval($params->get('width', 20));
$maxlength		 = $width > 20 ? $width : 20;
$text			 = $params->get('text', JText::_('search...'));
$text 			 = JText::_($text) ;	
$moduleclass_sfx = $params->get('moduleclass_sfx', '');
if ($imagebutton) {
    $img = modSearchHelper::getSearchImage( $button_text );
}

//S5 Ajax search parameters
$moreResultsText = $params->get('more_results_text', 'Search Results - Click Here For Full Results');
$moreResultsText = JText::_($moreResultsText) ;
$noResultsText = $params->get('no_results_text', 'No results');
$noResultsText = JText::_($noResultsText) ;
$popupWidth = $params->get('popup_width', 400);
$searchPhrase = $params->get('searchphrase', 'any');
$ordering = $params->get('ordering', 'newest');
$limit = $params->get('limit', 10);

//Add css and js code to header

$document = & JFactory::getDocument();
$url = JURI::root().'modules/mod_s5_live_search/';
$document->addScript($url.'/js/s5_ls_fade.js');
require(JModuleHelper::getLayoutPath('mod_s5_live_search'));
?>